home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1993 / Internet Info CD-ROM (Walnut Creek) (1993).iso / networking / ip / dns / bind / SA-v.-CIP-v.-POOL < prev    next >
Encoding:
Text File  |  1993-04-26  |  8.4 KB  |  186 lines

  1. To:  jaffe@playfair.rutgers.edu (Saul)
  2. cc:  bryan@umich.edu, bind-4.9@inet-gw-2.pa.dec.com
  3. From:  David Bolen <db3l@ans.net>
  4. Subject:  Re: Bind 4.9/named
  5. Date:  Fri, 16 Apr 93 15:58:26 EDT
  6. ----------------------------------
  7.  
  8. > From Saul Jaffe <jaffe@noc.rutgers.edu>
  9. >
  10. > >    From: Bryan Beecher <bryan@umich.edu>
  11. > >
  12. > >    Do you know about SA (Shuffle Address) records?  (...)
  13. > Actually, no I didn't know about them.
  14. > >    Maybe SA and CIP records are really the same thing . . .
  15. > Maybe they are - can you give me a little more detail on how they work?
  16.  
  17. Having just implemented yet another variant of this idea, perhaps I
  18. can help with a comparison.  It so happens that just this past week
  19. I've been going through both the CIP and SA versions of bind before
  20. working on a POOL (yep - yet another name :-)) record type for our use
  21. here at ANS.
  22.  
  23. Anyone can feel to correct anything amiss below - it's just my
  24. impression of these particular implementations.  As it turns out,
  25. neither were really exactly suited to my purpose, which is why I built
  26. the POOL record.  I've included some info on my POOL work as another
  27. point of comparison:
  28.  
  29.  
  30. SA Records:
  31.  
  32.       * Implemented as a 4.8.3 variant.
  33.       * "SA" in config file.  Stored within nameserver as T_A with a new
  34.     db flag DB_F_SHUFFLE on record.  Syntax in config file is the same
  35.     as an A record.
  36.       * Following the formation of a reply, if any DB_F_SHUFFLE records
  37.     were inserted into the answer, the answer is "shuffled".  Shuffling
  38.     involves randomly picking a new starting point in the set of
  39.     RRs in the answer, and then reordering the answer starting at
  40.     that point.  For example, if an answer had:
  41.         1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4
  42.     the shuffling would randomly pick a starting point (say
  43.     3.3.3.3) and then continue with the same order, such as:
  44.         3.3.3.3, 4.4.4.4, 1.1.1.1, 2.2.2.2
  45.     There is a static limit (currently 16 - arbitrary compiled-in
  46.     choice) to the number of records that can be shuffled.  If more
  47.     records (of any type) are present in the answer, then no
  48.     shuffling is done at all.
  49.       * Secondary nameservers are assumed not to understand SA records,
  50.     which are zone transferred simply as T_A records.  If you give
  51.     the -s flag to named, it assumes that all secondary nameservers
  52.     understand SA and it translates any T_A records with a DB_F_SHUFFLE
  53.     flag into T_SA records during a zone transfer.
  54.  
  55. CIP Records:
  56.  
  57.       * Implemented as a 4.8.3 variant.
  58.       * "CIP" in config file.  Stored within nameserver as T_CIP record.
  59.     Syntax in config file is like an MX record.  The numeric value
  60.     before the hostname is a ranking for that member of the CIP pool
  61.     used to control the chances that specific entry of the pool is
  62.     returned in response to a query.
  63.       * As part of the formation of a reply, a check is made to see if
  64.     no answers were located, and the request was for T_A records.
  65.     If no T_A records were found, a search is performed for T_CIP
  66.     records, which are then translated into an actual address ala
  67.     CNAME processing, which in turn is then returned to the user as
  68.     a T_A answer.  The selection of the appropriate T_CIP record is
  69.     done randomly but is weighted according to the preference
  70.     assigned to each T_CIP record per name.  Only the single selected
  71.     T_CIP record is returned.
  72.       * Prior to searching for a reply to a request, any CIP records
  73.     in the matching namebuf are rotated in a round-robin fashion.
  74.     (This doesn't seem to have any affect on reply formation - maybe
  75.      a leftover piece of code?)
  76.       * Secondary nameservers are assumed to understand CIP records,
  77.     which are zone transferred as T_CIP records.
  78.  
  79.  
  80. POOL Records:
  81.  
  82.       * Implemented as a 4.9 Beta (3/15) variant.
  83.       * "POOL" in config file.  Stored within nameserver as T_POOL record.
  84.     Syntax in config file is the same as an A record.
  85.       * Following the formation of a reply, if any T_POOL records were
  86.     inserted into the answer, the answer will be "fixed".  Fixing the
  87.     answer involves changing the T_POOL record type to T_A, and then
  88.     reordering the response.  During reordering, the first T_POOL
  89.     record in the answer is left alone.  Any remaining T_POOL records
  90.     are randomly ordered.  Thus, an answer of:
  91.         1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4
  92.     might be reordered to become:
  93.         1.1.1.1, 4.4.4.4, 2.2.2.2, 3.3.3.3
  94.     There is a static limit (currently 20 - arbitrary compiled-in
  95.     constant) to the number of T_POOL records that can be reordered.
  96.     If more than this many T_POOL records are in the answer, than
  97.     only the first 20 (or whatever) T_POOL records are reordered.
  98.       * Also after the formation of a reply, the T_POOL records within
  99.     the database entry are rotated in a round-robin fashion.  This
  100.     means that the primary answer in a pool will always rotate
  101.     through the pool round-robin, and the remainder of the pool will
  102.     always be returned as part of the answer, but in random order.
  103.       * By default, secondary nameservers are assumed not to understand
  104.     T_POOL records, which are zone transferred as T_A records.  A
  105.     new boot file option (poolns) was added to specify a list of
  106.     nameservers (ala the xfernets/bogusns options) that understand
  107.     T_POOL records.  Zone transfers from any of those nameservers will
  108.     receive the pool records as T_POOL records.
  109.  
  110.  
  111. General Comments:
  112.  
  113.       * Both SA and CIP implementations chose 104 as the record type.  I
  114.     chose 200 for POOL just to be different, and to avoid a clash.
  115.       * I'm not absolutely sure, but it looks like the shuffling code
  116.     in the SA implementation won't work unless you have nothing but
  117.     T_A/T_SA records for a node.  In addition, at long as you have
  118.     one T_SA record, all T_SA *and T_A* records are shuffled.
  119.       * CIPs use of names rather than addresses avoids the problem of
  120.     having to enter pool member addresses twice - once for the actual
  121.     A record and once as part of the pool.  This is nice.  I want to
  122.     move my POOL stuff in that direction, but was time constrained so
  123.     doing the A format was quicker initially.
  124.       * The ranking used by CIP is nice, but requires more thought as to
  125.     how to deal with cases where you want a machine to have a higher
  126.     probability of being the primary response, but at the same time
  127.     you don't really want it returned twice in a row in general.  You'd
  128.     just like it selected more often over a longer time scale.
  129.       * The fact that SA and POOL return the entire pool of addresses
  130.     is nice for providing a rollover in the case of a problem at the
  131.     primary address.
  132.  
  133.  
  134. In general, the reason I wrote the code for POOL records was to add
  135. some semantics over the other two implementations:
  136.  
  137. vs. CIP:
  138.  
  139.       * I need to return multiple answers.  The CPTs have a problem with
  140.     simultaneous arrival of TCP open requests, so I need to have
  141.     alternate addresses in the response for clients to fall over to.
  142.  
  143. vs. SA:
  144.  
  145.       * I didn't want the set of returned addresses to always follow
  146.     the same order.  That causes all clients to rollover the same
  147.     way, which can overload a machine just after one that might
  148.     go down or refuse connections.  I'm not sure having the primary
  149.     answer rotate round-robin really buys me anything, but at least
  150.     randomizing all other answers helps keep clients from piling
  151.     up on a single host due to rollover.
  152.  
  153. vs. both:
  154.  
  155.       * Wanted to deploy and test without updating all nameservers to
  156.     understand the new record.  I also wanted by nameserver control
  157.     over who needed to know about the new record.
  158.     
  159.  
  160. My resulting code is a bit closer to the SA implementation than to
  161. CIP, but it does perform it's operations at slightly different stages
  162. of processing than the SA code. 
  163.  
  164. In any event, that's how I see at least these three different
  165. implementations.  There is a subset of the IETF DNS WG that is working
  166. on trying to standardize on this sort of thing - including linking up
  167. with actual load info, such as that done by TGV and IBM
  168. implementations - but I needed something by the end of the month.
  169. Isn't that always the case :-)
  170.  
  171. Hopefully, a more standardized way of handling this sort of situation
  172. will be developed, but until that point if anyone is interested in my
  173. POOL code, feel free to let me know.  Give me a few days to finish
  174. testing though.
  175.  
  176. -- David
  177.  
  178. /-----------------------------------------------------------------------\
  179.  \              David Bolen             \  Internet: db3l@ans.net      /
  180.   |   Advanced Network & Services, Inc.   \   Phone: (914) 789-5327   |
  181.  / 100 Clearbrook Road, Elmsford, NY 10523  \   Fax: (914) 789-5310    \
  182. \-----------------------------------------------------------------------/
  183.